package com.wnn.demo.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
import java.util.Set;

/**
* Created by Mybatis Generator on 2019/08/31
*/

@ApiModel("用户信息实体类")
@JsonIgnoreProperties(value = {"handler"})
@Table(name = "sys_user")
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class User implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @ApiModelProperty("用户ID")
    @Column(name = "userId")
    private String userId;

    /**
     * 登录用户名
     */
    @ApiModelProperty("用户账号")
    @Column(name = "user_name")
    private String userName;

    /**
     * 密码
     */
    @ApiModelProperty("用户密码")
    @Column(name = "user_password")
    private String userPassword;

    @ApiModelProperty("用户姓名")
    @Column(name = "account")
    private String account;


    @ApiModelProperty("用户类型：0：商家，1：军人，2：志愿者")
    @Column(name = "types")
    private Integer types;

    @ApiModelProperty("用户性别：1：男 0：女")
    @Column(name = "sex")
    private Integer sex;

    @ApiModelProperty("身份证号")
    @Column(name = "idcard")
    private String idcard;

    @ApiModelProperty("电话号码")
    @Column(name = "phonenumber")
    private String phonenumber;


    //	附件集合
    @ApiModelProperty("附件集合")
    private List<Accessory> accessories;


    //  附件路径
    @ApiModelProperty("附件路径")
    @Column(name = "hidden_file_path")
    private String hiddenFilePath;


    @Column(name = "userRoleid")
    private String userRoleid;

    //    任务积分
    @Column(name = "integral")
    private Integer integral;

    public String getUserRoleid() {
        return userRoleid;
    }

    public void setUserRoleid(String userRoleid) {
        this.userRoleid = userRoleid;
    }

    @Column(name = "roleId")
    private String roleId;

    public String getRoleId() {
        return roleId;
    }

    public void setRoleId(String roleId) {
        this.roleId = roleId;
    }


    /**
     * 启用状态（1可用，0不可用）
     */
    private Integer status;

    @Column(name = "employeeId")
    private String employeeId;

    /**
     * 创建时间
     */
    @ApiModelProperty("创建时间")
    @JsonFormat(shape=JsonFormat.Shape.STRING,pattern="yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    @Column(name = "create_time")
    private Date createTime;

    /**
     * 更新时间
     */
    @ApiModelProperty("更新时间")
    @JsonFormat(shape=JsonFormat.Shape.STRING,pattern="yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    @Column(name = "update_time")
    private Date updateTime;

    private List<Role> roles;



}